{% extends 'base.html' %}

{% block contents_inner %}

    <div class="col-md-12">
        <div class="section-content">
            <div class="content-head"><h4 class="content-title">空气质量文件上传</h4>
                <div class="corner-content float-right">
                    <button class="content-settings" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Settings"><i class="fa fa-cog"></i></button>
                    <button class="content-refresh" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Reload"><i class="fa fa-refresh"></i></button>
                    <button class="content-collapse" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Collapse"><i class="fa fa-angle-down"></i></button>
                    <button class="content-close" data-toggle="tooltip" data-placement="top" title=""
                            data-original-title="Close"><i class="fa fa-close"></i></button>
                </div>
            </div>
            <div class="content-details show">
                <div class="card basic-form">
                    <div class="card-body card-block">
                        <form action="{% url 'dataset:add' %}" method="post" enctype="multipart/form-data" class="form-horizontal">
                            {% csrf_token %}
                            <div class="row form-group">
                                <div class="col col-md-3">
                                    <label for="file-input" class=" form-control-label">
                                    文件上传
                                    </label>
                                </div>
                                <div class="col-12 col-md-9">
                                    <input type="file" id="file-input" name="file-input" class="form-control-file"></div>
                            </div>
                            <div class="card-footer">
                                <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-dot-circle-o"></i>上传
                                </button>
                                <button type="reset" class="btn btn-danger btn-sm"><i class="fa fa-ban"></i>重置</button>
                            </div>
                        </form>
                        <p style="color: red;">{{ message }}</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}
